package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-07-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Coupon对象", description = "")
public class Coupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long saleId;

    @ApiModelProperty(value = "0:mix,1:reduction,2:fullreduction,3:discount")
    private CouponCategory category;

    @ApiModelProperty(value = "适用范围：0:mix,1:realtime,2:appointment")
    private CouponScope scope;

    @ApiModelProperty(value = "适用平台 0:mix[通用],1:app,2:wxmina[小程序],3:h5")
    private CouponPlatform platform;

    @ApiModelProperty(value = "来源渠道 0:system[平台发放],1:activity_team[助力]")
    private CouponSourceChannel sourceChannel;

    private Double digit;

    @ApiModelProperty(value = "优惠券类型：0:reduction(减免),1:discount(折扣)")
    private Boolean discountType;

    @ApiModelProperty(value = "折扣或减免金额")
    private Double discountDigit;

    private Long userId;

    @ApiModelProperty(value = "运营区ID")
    private Long cantonId;

    @ApiModelProperty(value = "乘客运营区Id")
    private Long customerRegionId;

    private Boolean hadUsed;

    @ApiModelProperty(value = "实际减免金额")
    private BigDecimal actualDiscount;

    private Date usedAt;

    @ApiModelProperty(value = "使用时间")
    private Long usedTimestamp;

    @ApiModelProperty(value = "开始时间")
    private Date startedAt;

    private Date endedAt;

    private String limitation;

    @ApiModelProperty(value = "使用条件(0:FULL，1:MAX)")
    private CouponUsageCondition usageCondition;

    @ApiModelProperty(value = "使用限制")
    private String usageLimit;

    private Date createdAt;

    @ApiModelProperty(value = "创建时间")
    private Long grantedTimestamp;

    private Long goodsId;

    private Long orderDetailId;

    private Integer saleCategory;


}
